package com.sfpay.merchant.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sfpay.merchant.auth.entity.system.SysMenu;
import com.sfpay.merchant.auth.entity.system.SysRole;
import com.sfpay.merchant.auth.entity.system.SysUser;
import com.sfpay.merchant.common.core.domain.Ztree;


import java.util.List;
import java.util.Set;

/**
 * <p>
 * 菜单权限表 服务类
 * </p>
 *
 * @author fangchen
 * @since 2022-07-15
 */
public interface ISysMenuService extends IService<SysMenu> {

    Set<String> selectPermsByUserId(Long userId);

    List<SysMenu> selectMenusByUser(SysUser user);

    List<Ztree> roleMenuTreeData(SysRole role, Long userId);

    /**
     * 查询菜单集合
     *
     * @param userId 用户ID
     * @return 所有菜单信息
     */
    public List<SysMenu> selectMenuAll(Long userId);

    List<SysMenu> selectMenuList(SysMenu menu, Long userId);

    SysMenu selectMenuById(Long parentId);

    String checkMenuNameUnique(SysMenu menu);

    int insertMenu(SysMenu menu);

    List<Ztree> menuTreeData(Long userId);

    int selectCountMenuByParentId(Long menuId);

    int selectCountRoleMenuByMenuId(Long menuId);

    int deleteMenuById(Long menuId);
}
